<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no,minimal-ui">
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
    <meta name="apple-mobile-web-app-title" content="">
    <meta content="telephone=no" name="format-detection" />
    <meta content="email=no" name="format-detection" />
    <!-- uc、qq浏览器 -->
    <meta name="screen-orientation" content="portrait">
    <meta name="full-screen" content="yes">
    <meta name="browsermode" content="application">
    <meta name="x5-orientation" content="portrait">
    <meta name="x5-fullscreen" content="true">
    <meta name="x5-page-mode" content="app">
    <meta name="HandheldFriendly" content="true">
    <meta name="MobileOptimized" content="320">
    <meta name="csrf-token" content="{{ csrf_token() }}" />

    <title>我的优惠券</title>
    <link rel="stylesheet" href="{{ asset('/build/css/app.min.css') }}">
    <link rel="stylesheet" type="text/css" href="{{mix('FENXIAO/css/index1.css')}}">
    <style type="text/css">
        .ui-tab-nav li a{
            display: block;
            color: #333;
        }
        .ui-my-order-tab .ui-tab-nav li.current{
            color: #81cac5;
            border-bottom: 1px solid #81cac5;
        }
        .ui-my-order-tab .ui-tab-nav li.current a{
            color: #81cac5;
        }
    </style>

</head>
<body ontouchstart="">




{{--<header class="ui-header ui-header-stable    af-header">--}}
    {{--<ul class="ui-row-flex">--}}
        {{--<li class="ui-col ui-flex ui-flex-pack-start">--}}
            {{--<i data-href="/user" class="ui-icon-return af-icon-home"></i>--}}
        {{--</li>--}}
        {{--<li class="ui-col ui-flex ui-flex-pack-center">--}}
            {{--<h1>我的优惠券</h1>--}}
        {{--</li>--}}
        {{--<li class="ui-col ui-flex ui-flex-pack-end">--}}

        {{--</li>--}}
    {{--</ul>--}}
{{--</header>--}}

<div class="ui-container" >
    <div class="ui-tab ui-my-order-tab">

        <ul class="ui-tab-nav ui-border-b">
            <li @if(empty($search['type_status']) || $search['type_status']=='1') class="cur current" @endif><a href="/my/coupon?type_status=1"> 未使用</a></li>
            <li @if(!empty($search['type_status']) && $search['type_status']==2) class="cur current" @endif><a href="/my/coupon?type_status=2"> 已使用</a></li>
            <li @if(!empty($search['type_status']) && $search['type_status']==3) class="cur current" @endif><a href="/my/coupon?type_status=3"> 已失效</a></li>
        </ul>

        <?php
            $skin='coupon1';
            $type=1;
            if(empty($search['type_status']) || $search['type_status']=='1'){
                $skin='coupon1';
            }
            if(!empty($search['type_status']) && $search['type_status']==2){
                $skin='coupon2';
                $type=2;
            }
            if(!empty($search['type_status']) && $search['type_status']==3){
                $skin='coupon3';
                $type=3;
            }
        ?>

        <ul class="coupon-list">
        @if($user_coupon->isNotEmpty())
            @foreach($user_coupon as $item)
                    <li class="coupon {{$skin}}">
                        <div class="coupon-top">
                            <div class="coupon-top-left">￥</div>
                            <div class="coupon-top-mid">{{$item->coupon->money}}</div>
                            <div class="coupon-top-right">
                                <div>元</div>
                                <div>优惠券</div>
                            </div>
                        </div>
                        <div class="coupon-bottom">有效期：{{date('Y-m-d',strtotime($item->coupon->start_time))}}-{{date('Y-m-d',strtotime($item->coupon->end_time))}}</div>
                    </li>
                <!-- 效果1 begin -->

        @endforeach
        @endif
        </ul>
    </div>

</div>
<footer>

</footer>
<script src="{{ asset('/build/lib/zepto.min.js') }}"></script>
<script src="{{ asset('/build/js/frozen.js') }}"></script>
<script src="{{ asset('/build/js/app.min.js') }}"></script>
</body>
</html>